package com.lwq.dubbo.dubbosampleconsumer;

import com.lwq.dubbo.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class DubboSampleConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(DubboSampleConsumerApplication.class, args);
    }

    @Reference
    HelloService helloService;

    @GetMapping("/say")
    public String say() {
        return helloService.hello("Vincent");
    }
}
